using System;
using System.IO;
using System.Reflection;
using Slaks.Web.Parser;

namespace TestHtmlParser
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			Slaks.Web.Parser.Utils.LocalPageDownload.IsEncodingDetectionForced = true;

			DocumentHtmlParser parser = 
				new DocumentHtmlParser(@"C:/Lang/Cpp/boost_1_33_1/libs/conversion/lexical_cast.htm","http://localhost/",System.Text.Encoding.UTF8);
			//HtmlParser parser = new HtmlParser(@"C:\Lang\projects\THESIS_RELATED\Files\webkb-data\Problem\test.html","http://localhost/",System.Text.Encoding.UTF8);
			//HtmlParser parser = new HtmlParser(@"http://www.scons.org/doc/HTML/scons-user/x464.html","http://localhost/",System.Text.Encoding.UTF8);

			//parser.ImportantStructureXmlFile = @"D:\slava\projects\SearchEngineParsers\NetscapeParser\Configuration\netscape.config";
			//parser.UseImportantStructuresFromXmlFile(true);

		  //SearchEngineParser parser = new AltaVistaParser("panzer commander");

			//parser.ImportantStructureXmlFile = @"C:\Lang\projects\HtmlParser\TestHtmlParser\document-parsing.config";
			//parser.UseImportantStructuresFromXmlFile(true);

			if (parser.ParseMe())
			{
				parser.WriteStructures(Console.Out,parser.RootStructure);
			}
		}
	}
}
